import axios from './request';

export default {
  addAnswers(data) {
    return axios.post('/answers', data, {
      headers: {
        'Content-Type': 'application/json;charset=utf-8',
      },
      transformRequest: [
        (d) => JSON.stringify(d),
      ],
    });
  },
  getAnswers(id) {
    return axios.get('/answers', {
      params: {
        paperId: id,
      },
    });
  },
  deleteAnswers(id) {
    return axios.delete(`/answers/${id}`);
  },
};
